//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.qst.crop.entity;

import io.swagger.annotations.ApiModel;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Table(
        name = "tb_order"
)
@ApiModel(
        value = "oder",
        description = "商品"
)
public class Order {
    @Id
    private Integer orderId;
    @NotBlank(
            message = "标题不能为空"
    )
    @Length(
            min = 2,
            max = 8,
            message = "标题长度在2-8之间"
    )
    private String title;
    @Column(
            name = "price"
    )
    @NotBlank(
            message = "价格不能为空"
    )
    private @Pattern(
            regexp = "^(([1-9]{1}\\d*)|(0{1}))(\\.\\d{1,2})?$",
            message = "请输入合理的价格，由数字组成，最多两位小数"
    ) String price;
    @NotBlank(
            message = "内容不能为空"
    )
    @Length(
            min = 10,
            max = 150,
            message = "内容长度在10-150之间"
    )
    private String content;
    private Integer orderStatus;
    @Column(
            name = "type"
    )
    private String type;
    private String picture;
    private String ownName;
    private String cooperationName;
    private Date createTime;
    private Date updateTime;
    @Length(
            min = 15,
            max = 30
    )
    private String address;

    public Integer getOrderId() {
        return this.orderId;
    }

    public String getTitle() {
        return this.title;
    }

    public String getPrice() {
        return this.price;
    }

    public String getContent() {
        return this.content;
    }

    public Integer getOrderStatus() {
        return this.orderStatus;
    }

    public String getType() {
        return this.type;
    }

    public String getPicture() {
        return this.picture;
    }

    public String getOwnName() {
        return this.ownName;
    }

    public String getCooperationName() {
        return this.cooperationName;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public String getAddress() {
        return this.address;
    }

    public void setOrderId(final Integer orderId) {
        this.orderId = orderId;
    }

    public void setTitle(final String title) {
        this.title = title;
    }

    public void setPrice(final String price) {
        this.price = price;
    }

    public void setContent(final String content) {
        this.content = content;
    }

    public void setOrderStatus(final Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public void setType(final String type) {
        this.type = type;
    }

    public void setPicture(final String picture) {
        this.picture = picture;
    }

    public void setOwnName(final String ownName) {
        this.ownName = ownName;
    }

    public void setCooperationName(final String cooperationName) {
        this.cooperationName = cooperationName;
    }

    public void setCreateTime(final Date createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(final Date updateTime) {
        this.updateTime = updateTime;
    }

    public void setAddress(final String address) {
        this.address = address;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Order)) {
            return false;
        } else {
            Order other = (Order)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label155: {
                    Object this$orderId = this.getOrderId();
                    Object other$orderId = other.getOrderId();
                    if (this$orderId == null) {
                        if (other$orderId == null) {
                            break label155;
                        }
                    } else if (this$orderId.equals(other$orderId)) {
                        break label155;
                    }

                    return false;
                }

                Object this$orderStatus = this.getOrderStatus();
                Object other$orderStatus = other.getOrderStatus();
                if (this$orderStatus == null) {
                    if (other$orderStatus != null) {
                        return false;
                    }
                } else if (!this$orderStatus.equals(other$orderStatus)) {
                    return false;
                }

                Object this$title = this.getTitle();
                Object other$title = other.getTitle();
                if (this$title == null) {
                    if (other$title != null) {
                        return false;
                    }
                } else if (!this$title.equals(other$title)) {
                    return false;
                }

                label134: {
                    Object this$price = this.getPrice();
                    Object other$price = other.getPrice();
                    if (this$price == null) {
                        if (other$price == null) {
                            break label134;
                        }
                    } else if (this$price.equals(other$price)) {
                        break label134;
                    }

                    return false;
                }

                label127: {
                    Object this$content = this.getContent();
                    Object other$content = other.getContent();
                    if (this$content == null) {
                        if (other$content == null) {
                            break label127;
                        }
                    } else if (this$content.equals(other$content)) {
                        break label127;
                    }

                    return false;
                }

                label120: {
                    Object this$type = this.getType();
                    Object other$type = other.getType();
                    if (this$type == null) {
                        if (other$type == null) {
                            break label120;
                        }
                    } else if (this$type.equals(other$type)) {
                        break label120;
                    }

                    return false;
                }

                Object this$picture = this.getPicture();
                Object other$picture = other.getPicture();
                if (this$picture == null) {
                    if (other$picture != null) {
                        return false;
                    }
                } else if (!this$picture.equals(other$picture)) {
                    return false;
                }

                label106: {
                    Object this$ownName = this.getOwnName();
                    Object other$ownName = other.getOwnName();
                    if (this$ownName == null) {
                        if (other$ownName == null) {
                            break label106;
                        }
                    } else if (this$ownName.equals(other$ownName)) {
                        break label106;
                    }

                    return false;
                }

                Object this$cooperationName = this.getCooperationName();
                Object other$cooperationName = other.getCooperationName();
                if (this$cooperationName == null) {
                    if (other$cooperationName != null) {
                        return false;
                    }
                } else if (!this$cooperationName.equals(other$cooperationName)) {
                    return false;
                }

                label92: {
                    Object this$createTime = this.getCreateTime();
                    Object other$createTime = other.getCreateTime();
                    if (this$createTime == null) {
                        if (other$createTime == null) {
                            break label92;
                        }
                    } else if (this$createTime.equals(other$createTime)) {
                        break label92;
                    }

                    return false;
                }

                Object this$updateTime = this.getUpdateTime();
                Object other$updateTime = other.getUpdateTime();
                if (this$updateTime == null) {
                    if (other$updateTime != null) {
                        return false;
                    }
                } else if (!this$updateTime.equals(other$updateTime)) {
                    return false;
                }

                Object this$address = this.getAddress();
                Object other$address = other.getAddress();
                if (this$address == null) {
                    if (other$address != null) {
                        return false;
                    }
                } else if (!this$address.equals(other$address)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Order;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $orderId = this.getOrderId();
        result = result * 59 + ($orderId == null ? 43 : $orderId.hashCode());
        Object $orderStatus = this.getOrderStatus();
        result = result * 59 + ($orderStatus == null ? 43 : $orderStatus.hashCode());
        Object $title = this.getTitle();
        result = result * 59 + ($title == null ? 43 : $title.hashCode());
        Object $price = this.getPrice();
        result = result * 59 + ($price == null ? 43 : $price.hashCode());
        Object $content = this.getContent();
        result = result * 59 + ($content == null ? 43 : $content.hashCode());
        Object $type = this.getType();
        result = result * 59 + ($type == null ? 43 : $type.hashCode());
        Object $picture = this.getPicture();
        result = result * 59 + ($picture == null ? 43 : $picture.hashCode());
        Object $ownName = this.getOwnName();
        result = result * 59 + ($ownName == null ? 43 : $ownName.hashCode());
        Object $cooperationName = this.getCooperationName();
        result = result * 59 + ($cooperationName == null ? 43 : $cooperationName.hashCode());
        Object $createTime = this.getCreateTime();
        result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
        Object $updateTime = this.getUpdateTime();
        result = result * 59 + ($updateTime == null ? 43 : $updateTime.hashCode());
        Object $address = this.getAddress();
        result = result * 59 + ($address == null ? 43 : $address.hashCode());
        return result;
    }

    public String toString() {
        return "Order(orderId=" + this.getOrderId() + ", title=" + this.getTitle() + ", price=" + this.getPrice() + ", content=" + this.getContent() + ", orderStatus=" + this.getOrderStatus() + ", type=" + this.getType() + ", picture=" + this.getPicture() + ", ownName=" + this.getOwnName() + ", cooperationName=" + this.getCooperationName() + ", createTime=" + this.getCreateTime() + ", updateTime=" + this.getUpdateTime() + ", address=" + this.getAddress() + ")";
    }

    public Order(final Integer orderId, final String title, final String price, final String content, final Integer orderStatus, final String type, final String picture, final String ownName, final String cooperationName, final Date createTime, final Date updateTime, final String address) {
        this.orderId = orderId;
        this.title = title;
        this.price = price;
        this.content = content;
        this.orderStatus = orderStatus;
        this.type = type;
        this.picture = picture;
        this.ownName = ownName;
        this.cooperationName = cooperationName;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.address = address;
    }

    public Order() {
    }
}
